package mybatis.controller;

import mybatis.entity.User;
import mybatis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import java.text.ParseException;

/**
 * Author：汤小洋
 * Date：2022-11-23 16:05
 * Description：<描述>
 */
@Controller
public class UserController {

    @Autowired
    private UserService userService;


    public void register(User user) throws ParseException {
        userService.register(user);
    }

    public User login(String username, String password) {
        return userService.login(username,password);
    }

}
